package com.caishi.lkx.user.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zzw.common.service.model.NameModel;
import com.zzw.common.service.model.base.BaseTreeModel;
import lombok.*;

import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("cu_admin_user")
public class AdminUserModel extends IUserModel<AdminUserModel> implements BaseTreeModel<AdminUserModel, String>, NameModel<AdminUserModel, String> {

    private Long groupId;

    private String parentId;

    /**
     * 是否时机构所属者
     */
    private Boolean groupOwner;
    /**
     * 描述
     */
    private String description;


    @TableField(exist = false)
    private AdminUserModel parent;

    @TableField(exist = false)
    private List<AdminUserModel> children;

    @TableField(exist = false)
    private List<PositionModel> positions;

    @TableField(exist = false)
    private List<ActionRoleModel> roles;

    @TableField(exist = false)
    private String userName;
    @TableField(exist = false)
    private Integer distributionLevel;

    @Override
    public AdminUserModel InstanceThisObj() {
        return new AdminUserModel();
    }


}
